package cn.itcast.demo05;

import java.io.FileWriter;
import java.io.IOException;

/*
字符输出流的其他方法；
        void write(char[] c)
        void .....
 */
public class Demo03Writer {
    public static void main(String[] args) throws IOException {
        FileWriter fw = new FileWriter("E:\\WkJava\\day02-code\\e.txt");
        char[] cs = {'a','b','c','d','e'};
        fw.write(cs);//写字符数组

        fw.write(cs,0,3);//写部分字符数组

        //写入字符串
        fw.write("王凯");
        fw.write("发挥环境安静看看",0,4);
        fw.close();
    }
}
